<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>

</head>
<body>
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel">
    <div class="modal-dialog" role="document"  style="width: 50%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="editModalLabel">新增服务器</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="serverEdit">
                		<input type="hidden" name="id" id="edit_serverId" value="${param.serverId}" />
                        
                        <fieldset class="plan-left-info-fieldset">
                                <legend><span>基本信息</span></legend>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>服务器名称</label>
                                    <div class="col-sm-10">
                                    <input type="text" maxlength="32" class="form-control" id="edit_serverName" name="serverName"
                                           placeholder="请输入服务器名称" data-easyform="length:1 32;char-chinese;"
                                           data-message="请输入1-32位服务器名称" require="true">
                                    </div>
                                </div >
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>服务器完整根路径</label>
                                    <div class="col-sm-10">
                                    <input type="text" maxlength="64" class="form-control" id="edit_contextPath" name="contextPath"
                                           placeholder="请输入服务器完整根路径" data-easyform="length:1 32;char-chinese;"
                                           data-message="请输入服务器完整根路径" require="true">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>地区编码</label>
                                    <div class="col-sm-10">
                                    <input type="text" maxlength="18" class="form-control" id="edit_areaCode" name="areaCode"
                                           placeholder="请输入地区编码(唯一)" data-easyform="length:1 18;char-chinese;"
                                           data-message="请输入1—18位地区编码" require="true">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>鉴权ID</label>
                                    <div class="col-sm-10">
                                    <input type="text" maxlength="64" class="form-control" id="edit_proxyId" name="proxyId"
                                           placeholder="请输入鉴权ID" data-easyform="length:1 64;char-chinese;"
                                           data-message="请输入1—64位鉴权ID" require="false">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>鉴权密钥</label>
                                    <div class="col-sm-10">
                                    <input type="text" maxlength="64" class="form-control" id="edit_proxySecret" name="proxySecret"
                                           placeholder="请输入鉴权密钥" data-easyform="length:1 64;char-chinese;"
                                           data-message="请输入1—64位鉴权密钥" require="false">
                                    </div>
                                </div>
                                <legend><span>MQTT信息</span></legend>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>MQTT_IP</label>
                                    <div class="col-sm-10">
                                    <input type="text" maxlength="16" class="form-control" id="edit_mqttHostIp" name="mqttHostIp" placeholder="请输入MQTT_ID" 
                                    		data-easyform="length:1 16;char-chinese;" data-message="请输入1—16位MQTT host的IP地址" require="false" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>MQTT_TCP_PORT</label>
                                    <div class="col-sm-10">
                                    <input type="text" maxlength="8" class="form-control " id="edit_mqttTcpHostPort" name="mqttTcpHostPort" 
                                    		placeholder="请输入MQTT_TCP端口" data-easyform="length:1 8;char-chinese;" data-message="请输入1—8位MQTT tcp的端口号" require="false" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>MQTT_WEB_PORT</label>
                                    <div class="col-sm-10">
                                    <input type="text" class="form-control" maxlength="8" id="edit_mqttSocketHostPort" name="mqttSocketHostPort"
                                    		 placeholder="请输入MQTT_WEB端口" data-easyform="length:1 8;char-chinese;" data-message="请输入1—8位MQTT web的端口号" require="false" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>MQTT账号</label>
                                    <div class="col-sm-10">
                                    <input type="text" class="form-control" maxlength="32" id="edit_mqttAccount" name="mqttAccount"  
                                    		placeholder="请输入MQTT账号" data-easyform="length:1 32;char-chinese;" data-message="请输入1—32位MQTT账号" require="false" />
                                    </div>
                                </div>
                              
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>MQTT密码</label>
                                    <div class="col-sm-10">
                                    <input type="password" class="form-control"  id="edit_mqttPwd" name="mqttPwd" 
                                    		placeholder="请输入MQTT密码" data-easyform="length:1 32;char-chinese;" data-message="请输入1—32位MQTT密码" require="true"/>
                                    </div>
                                </div>
                                <legend><span>保险信息</span></legend>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>购买保险邮箱</label>
                                    <div class="col-sm-10">
                                    <input type="email" class="form-control" maxlength="256" id="edit_insuranceSendEmail" name="insuranceSendEmail" 
                                    		placeholder="请输入购买保险的邮箱" data-easyform="length:1 256;char-chinese;" 
                                    		data-message="请输入购买保险的邮箱" require="false" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"><span class="required">*</span>购买保险抄送邮箱</label>
                                    <div class="col-sm-10">
                                    <input type="email" class="form-control" maxlength="256" id="edit_insuranceCcEmail" name="insuranceCcEmail" 
                                    		placeholder="请输入购买保险抄送的邮箱" data-easyform="length:1 256;char-chinese;"
                                    		 data-message="请输入抄送的邮箱" require="false" />
                                    </div>
                                </div>
                                 <div class="form-group" style="width: 100%">
					                <label class="control-label col-sm-2"><span class="required">*</span>是否发送保险邮件</label>
					                <div class="form-control">
					                    <label class="radio-inline" >
					                        <input type="radio" name="edit_needIsurEmail" id="needIsurEmail1" value="1"> 是
					                    </label>
					                    <label class="radio-inline" >
					                        <input type="radio" name="edit_needIsurEmail" id="needIsurEmail2" value="0"> 否
					                    </label>
					                </div>
					            </div>
                        </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal" >取消</button>
                <button type="button" class="btn btn-primary" id="saveServer" onclick="saveServer();">保存</button>
            </div>
        </div>
    </div>
</div>

</body>
</html>
